package com.guchenbo.erp.inventory.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.guchenbo.erp.dao.entity.ErpBaseModel;
import java.math.BigDecimal;

/**
 * <p>
 * 库存成本表
 * </p>
 *
 * @author guchenbo
 * @since 2025-07-12
 */
@TableName("erp_inventory_cost")
public class InventoryCost extends ErpBaseModel {

    @TableId(value = "cost_id", type = IdType.AUTO)
    private Long costId;

    private Long productId;

    private Long warehouseId;

    private String batchNo;

    /**
     * 单位成本
     */
    private BigDecimal costPrice;

    /**
     * 对应数量
     */
    private BigDecimal quantity;

    private BigDecimal totalAmount;

    /**
     * 成本算法
     */
    private String costMethod;

    public Long getCostId() {
        return costId;
    }

    public void setCostId(Long costId) {
        this.costId = costId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getWarehouseId() {
        return warehouseId;
    }

    public void setWarehouseId(Long warehouseId) {
        this.warehouseId = warehouseId;
    }

    public String getBatchNo() {
        return batchNo;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public BigDecimal getQuantity() {
        return quantity;
    }

    public void setQuantity(BigDecimal quantity) {
        this.quantity = quantity;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getCostMethod() {
        return costMethod;
    }

    public void setCostMethod(String costMethod) {
        this.costMethod = costMethod;
    }

    @Override
    public String toString() {
        return "InventoryCost{" +
            "costId = " + costId +
            ", productId = " + productId +
            ", warehouseId = " + warehouseId +
            ", batchNo = " + batchNo +
            ", costPrice = " + costPrice +
            ", quantity = " + quantity +
            ", totalAmount = " + totalAmount +
            ", costMethod = " + costMethod +
        "}";
    }
}
